package com.hzpd.hainan.module.video.adapter;

import android.app.Activity;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hzpd.hainan.R;
import com.hzpd.hainan.model.video.VideoItemBean;
import com.hzpd.hainan.module.video.utils.VideoPlayerHelper;
import com.hzpd.hainan.utils.PageCtrl;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by 猪猪侠 on 2017/7/20.
 */

public class VideoRecycleAdapter extends BaseQuickAdapter<VideoItemBean,BaseViewHolder> {

    private List<VideoItemBean> list;
    public VideoRecycleAdapter(List<VideoItemBean> list){
        super(R.layout.recycle_videoitem,list);
    }
    @Override
    protected void convert(BaseViewHolder helper, VideoItemBean item) {
        Glide.with(mContext).load(item.getMainpic()).crossFade().placeholder(R.drawable.default_bg).into((ImageView) helper.getView(R.id.img_bg_id));
        helper.setText(R.id.title,item.getTitle())
        .addOnClickListener(R.id.rl_id)
        .addOnClickListener(R.id.video_info_rl);

    }












}
